home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / btrtest / btrtest.frm < prev    next >
Text File  |  1995-09-06  |  15KB  |  561 lines

  1. VERSION 2.00
  2. Begin Form EmpMst 
  3.    BackColor       =   &H00C0C0C0&
  4.    Caption         =   "Btrieve Test Program"
  5.    ClientHeight    =   3420
  6.    ClientLeft      =   1140
  7.    ClientTop       =   1470
  8.    ClientWidth     =   7635
  9.    Height          =   3825
  10.    Icon            =   BTRTEST.FRX:0000
  11.    Left            =   1080
  12.    LinkMode        =   1  'Source
  13.    LinkTopic       =   "Form1"
  14.    MaxButton       =   0   'False
  15.    ScaleHeight     =   3420
  16.    ScaleWidth      =   7635
  17.    Top             =   1125
  18.    Width           =   7755
  19.    Begin TextBox HPhone 
  20.       Height          =   285
  21.       Left            =   3600
  22.       TabIndex        =   26
  23.       Top             =   3015
  24.       Width           =   1860
  25.    End
  26.    Begin TextBox WPhone 
  27.       Height          =   285
  28.       Left            =   3600
  29.       TabIndex        =   25
  30.       Top             =   2655
  31.       Width           =   1860
  32.    End
  33.    Begin TextBox ZipCod 
  34.       Height          =   285
  35.       Left            =   3600
  36.       TabIndex        =   4
  37.       Top             =   2295
  38.       Width           =   1095
  39.    End
  40.    Begin TextBox SocSec 
  41.       Height          =   285
  42.       Left            =   3600
  43.       TabIndex        =   3
  44.       Top             =   1935
  45.       Width           =   2175
  46.    End
  47.    Begin TextBox FstNam 
  48.       Height          =   285
  49.       Left            =   3600
  50.       TabIndex        =   2
  51.       Top             =   1575
  52.       Width           =   2190
  53.    End
  54.    Begin TextBox LstNam 
  55.       Height          =   285
  56.       Left            =   3600
  57.       TabIndex        =   1
  58.       Top             =   1215
  59.       Width           =   2190
  60.    End
  61.    Begin ListBox EmpList 
  62.       Height          =   2370
  63.       Left            =   90
  64.       TabIndex        =   10
  65.       Top             =   900
  66.       Width           =   2265
  67.    End
  68.    Begin TextBox EmpNum 
  69.       Height          =   285
  70.       Left            =   3600
  71.       TabIndex        =   0
  72.       Top             =   855
  73.       Width           =   735
  74.    End
  75.    Begin Frame Frame3 
  76.       BackColor       =   &H00C0C0C0&
  77.       Caption         =   "Data Access"
  78.       Height          =   3210
  79.       Left            =   5895
  80.       TabIndex        =   16
  81.       Top             =   90
  82.       Width           =   1680
  83.       Begin Frame Frame4 
  84.          BackColor       =   &H00C0C0C0&
  85.          Caption         =   "Select By"
  86.          Height          =   1230
  87.          Left            =   90
  88.          TabIndex        =   21
  89.          Top             =   1845
  90.          Width           =   1500
  91.          Begin OptionButton SelectByFirst 
  92.             BackColor       =   &H00C0C0C0&
  93.             Caption         =   "First Name"
  94.             Height          =   240
  95.             Left            =   90
  96.             TabIndex        =   23
  97.             Top             =   900
  98.             Width           =   1365
  99.          End
  100.          Begin OptionButton SelectByLast 
  101.             BackColor       =   &H00C0C0C0&
  102.             Caption         =   "Last Name"
  103.             Height          =   240
  104.             Left            =   90
  105.             TabIndex        =   22
  106.             Top             =   585
  107.             Width           =   1365
  108.          End
  109.          Begin OptionButton SelectByNum 
  110.             BackColor       =   &H00C0C0C0&
  111.             Caption         =   "Employee #"
  112.             Height          =   240
  113.             Left            =   90
  114.             TabIndex        =   24
  115.             Top             =   270
  116.             Width           =   1320
  117.          End
  118.       End
  119.       Begin CommandButton LastCommand 
  120.          Caption         =   "Last"
  121.          Height          =   330
  122.          Left            =   315
  123.          TabIndex        =   18
  124.          Top             =   1485
  125.          Width           =   1050
  126.       End
  127.       Begin CommandButton PreviousCommand 
  128.          Caption         =   "Previous"
  129.          Height          =   330
  130.          Left            =   315
  131.          TabIndex        =   17
  132.          Top             =   1080
  133.          Width           =   1050
  134.       End
  135.       Begin CommandButton NextCommand 
  136.          Caption         =   "Next"
  137.          Height          =   330
  138.          Left            =   315
  139.          TabIndex        =   19
  140.          Top             =   675
  141.          Width           =   1050
  142.       End
  143.       Begin CommandButton FirstCommand 
  144.          Caption         =   "First"
  145.          Height          =   330
  146.          Left            =   315
  147.          TabIndex        =   20
  148.          Top             =   270
  149.          Width           =   1050
  150.       End
  151.    End
  152.    Begin Frame Frame2 
  153.       BackColor       =   &H00C0C0C0&
  154.       Caption         =   " Action"
  155.       Height          =   690
  156.       Left            =   90
  157.       TabIndex        =   11
  158.       Top             =   90
  159.       Width           =   5685
  160.       Begin CommandButton ExitCommand 
  161.          Caption         =   "Exit"
  162.          Height          =   330
  163.          Left            =   4500
  164.          TabIndex        =   15
  165.          Top             =   270
  166.          Width           =   1050
  167.       End
  168.       Begin CommandButton DeleteCommand 
  169.          Caption         =   "Delete"
  170.          Height          =   330
  171.          Left            =   3060
  172.          TabIndex        =   14
  173.          Top             =   270
  174.          Width           =   1050
  175.       End
  176.       Begin CommandButton ChangeCommand 
  177.          Caption         =   "Change"
  178.          Height          =   330
  179.          Left            =   1620
  180.          TabIndex        =   13
  181.          Top             =   270
  182.          Width           =   1050
  183.       End
  184.       Begin CommandButton AddCommand 
  185.          Caption         =   "Add"
  186.          Height          =   330
  187.          Left            =   135
  188.          TabIndex        =   12
  189.          Top             =   270
  190.          Width           =   1050
  191.       End
  192.    End
  193.    Begin Label Label5 
  194.       BackColor       =   &H00C0C0C0&
  195.       Caption         =   "Home Phone"
  196.       Height          =   195
  197.       Left            =   2430
  198.       TabIndex        =   28
  199.       Top             =   3060
  200.       Width           =   1140
  201.    End
  202.    Begin Label Label12 
  203.       BackColor       =   &H00C0C0C0&
  204.       Caption         =   "Work Phone"
  205.       Height          =   195
  206.       Left            =   2430
  207.       TabIndex        =   27
  208.       Top             =   2700
  209.       Width           =   1095
  210.    End
  211.    Begin Label Label4 
  212.       BackColor       =   &H00C0C0C0&
  213.       Caption         =   "Zip Code"
  214.       Height          =   210
  215.       Left            =   2430
  216.       TabIndex        =   9
  217.       Top             =   2340
  218.       Width           =   975
  219.    End
  220.    Begin Label Label1 
  221.       BackColor       =   &H00C0C0C0&
  222.       Caption         =   "SSN"
  223.       Height          =   210
  224.       Left            =   2430
  225.       TabIndex        =   8
  226.       Top             =   1980
  227.       Width           =   960
  228.    End
  229.    Begin Label Label2 
  230.       BackColor       =   &H00C0C0C0&
  231.       Caption         =   "First Name"
  232.       Height          =   210
  233.       Left            =   2430
  234.       TabIndex        =   5
  235.       Top             =   1620
  236.       Width           =   1005
  237.    End
  238.    Begin Label Label6 
  239.       BackColor       =   &H00C0C0C0&
  240.       Caption         =   "Last Name"
  241.       Height          =   210
  242.       Left            =   2430
  243.       TabIndex        =   7
  244.       Top             =   1260
  245.       Width           =   1020
  246.    End
  247.    Begin Label Label7 
  248.       BackColor       =   &H00C0C0C0&
  249.       Caption         =   "Employee #"
  250.       Height          =   210
  251.       Left            =   2430
  252.       TabIndex        =   6
  253.       Top             =   900
  254.       Width           =   1095
  255.    End
  256. End
  257.  
  258. Sub AddCommand_Click ()
  259.     
  260.     KeyBufLen% = Len(KeyBuff)
  261.     SetBuff
  262.     BufLen% = Len(DataBuff)
  263.     Status% = BTRCALL(BINSERT, POSBLOCK, DataBuff, BufLen%, KeyBuff, KeyBufLen%, KeyNum%)
  264.     If Status% <> 0 Then
  265.         BtrErr (Status%)
  266.       Else
  267.         PaintData
  268.         Response% = MsgBox("Add Action Successful", 64, "File Action Message